package models.services.utils;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesManager {

	private static PropertiesManager instance;

	private PropertiesManager() {
	}

	public static PropertiesManager getInstance() {
		if (instance == null)
			instance = new PropertiesManager();
		return instance;
	}

	public Properties getDBProperties() {
		Properties properties = new Properties();
		InputStream input = null;
		try {
			input = new FileInputStream("C:/database.properties");
			properties.load(input);
			properties.list(System.out);

		} catch (IOException e) {
			System.out.println("Error al leer archivo de configuracion");
			return null;
		}
		return properties;
	}
}
